<template>
  <div id="cart">
    <nav-bar class="cart-nav">
      <div slot="center">购物车({{ $store.state.cartList.length }})</div>
    </nav-bar>
    <cart-list></cart-list>
    <cart-button-bar></cart-button-bar>
  </div>
</template>

<script>
import NavBar from "../../components/common/navigationbar/NavBar.vue";
import CartButtonBar from './childCart/CartButtonBar.vue';
import CartList from './childCart/CartList.vue';

export default {
  components: { NavBar, CartList, CartButtonBar },
  name: "Cart",
};
</script>

<style scoped>
#cart{
  height: 100vh;
}
.cart-nav {
  background-color: palevioletred;
  color: white;
  width: 100%;
}
</style>